{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "from jqdatasdk import *\n",
    "auth('15211097884','097884')\n",
    "import pandas as pd\n",
    "import numpy as np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>ts_code</th>\n",
       "      <th>name</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>000002.SZ</td>\n",
       "      <td>万科A</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>000004.SZ</td>\n",
       "      <td>国农科技</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>000005.SZ</td>\n",
       "      <td>世纪星源</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>000006.SZ</td>\n",
       "      <td>深振业A</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>000007.SZ</td>\n",
       "      <td>全新好</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     ts_code  name\n",
       "0  000002.SZ   万科A\n",
       "1  000004.SZ  国农科技\n",
       "2  000005.SZ  世纪星源\n",
       "3  000006.SZ  深振业A\n",
       "4  000007.SZ   全新好"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "stock_list = pd.read_csv(\"../data_pulled/stock_date_delta_priceNone.csv\")\n",
    "stock_list.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "def ts_code_trans(ts_code):\n",
    "    if ts_code[7:] == \"SZ\" :\n",
    "        return ts_code[:6] + \".XSHE\"\n",
    "    else:\n",
    "        return ts_code[:6] + \".XSHG\"\n",
    "    \n",
    "def query_stock(ts_code):\n",
    "\n",
    "    q = query(\n",
    "          income.statDate,\n",
    "          income.code,\n",
    "          indicator.roe, # 股东权益报酬率(%) RoE\n",
    "          indicator.roa, # 总资产报酬率(%) RoA\n",
    "          indicator.adjusted_profit, # 税后净利规模(百万)\n",
    "          indicator.net_profit_margin, # 销售净利率(%)\n",
    "          indicator.gross_profit_margin, # 销售毛利率(%)\n",
    "\n",
    "          income.operating_revenue, # 营业收入\n",
    "          balance.total_assets, # 总资产\n",
    "          balance.total_current_assets, # 流动资产合计\n",
    "          balance.total_current_liability, # 流动负债\n",
    "          cash_flow.net_operate_cash_flow # 经营活动产生的现金流量净额\n",
    "      ).filter(\n",
    "          income.code == ts_code\n",
    "      )\n",
    "    \n",
    "    return q\n",
    "\n",
    "def calculate_score(rets):\n",
    "    \n",
    "    score = 0\n",
    "\n",
    "    # 股东权益报酬率(%) RoE\n",
    "    ROE = rets.roe.mean()\n",
    "    if ROE >= 35:\n",
    "        score +=550\n",
    "    elif ROE >= 30:\n",
    "        score +=500\n",
    "    elif ROE >= 25:\n",
    "        score +=450\n",
    "    elif ROE >= 20:\n",
    "        score +=400\n",
    "    elif ROE >= 15:\n",
    "        score +=300\n",
    "    elif ROE >= 10:\n",
    "        score +=250\n",
    "\n",
    "    # 总资产报酬率(%) RoA\n",
    "    ROA = rets.roa.mean()\n",
    "    if ROA >= 15:\n",
    "        score +=100\n",
    "    elif ROE >= 11:\n",
    "        score +=80\n",
    "    elif ROE >= 7:\n",
    "        score +=50\n",
    "\n",
    "    # 税后净利规模(百万)\n",
    "    adjusted_profit = rets.adjusted_profit.mean() / 1e6\n",
    "    if adjusted_profit >= 10000:\n",
    "        score +=150\n",
    "    elif adjusted_profit >= 1000:\n",
    "        score +=100\n",
    "\n",
    "    # 现金状况分析\n",
    "    operating_revenue = rets.operating_revenue.mean()\n",
    "    total_assets = rets.total_assets.mean()\n",
    "    total_current_assets = rets.total_current_assets.mean()\n",
    "    total_assets_ = operating_revenue / total_assets\n",
    "    total_current_assets_ = total_current_assets / total_assets\n",
    "    if (total_current_assets_ > 0.8 and total_assets_ > 0.1) or \\\n",
    "        (total_current_assets < 0.8 and  total_assets_ > 0.2):\n",
    "        score +=50\n",
    "\n",
    "    # 毛利率波动(%)\n",
    "    gross_profit_mean = rets.gross_profit_margin.mean()\n",
    "    range_list = [ 1 if (profit-gross_profit_mean)/gross_profit_mean > 0.3 else 0 for profit in rets[\"gross_profit_margin\"]]\n",
    "    if np.array(range_list).sum() == 0:\n",
    "        score += 50\n",
    "\n",
    "    # 经营安全边际率(%)\n",
    "    net_profit_margin = rets.net_profit_margin.mean()\n",
    "    gross_profit_margin = rets.gross_profit_margin.mean()\n",
    "    net_gross_profit = net_profit_margin / gross_profit_margin\n",
    "    if net_gross_profit >= 70:\n",
    "        score +=50\n",
    "    elif net_gross_profit >= 50:\n",
    "        score +=30\n",
    "    elif net_gross_profit >= 30:\n",
    "        score += 10\n",
    "\n",
    "    def range_decay(profit, score):\n",
    "        \n",
    "        if profit[1]>profit[0]:\n",
    "            score += 15\n",
    "        else:\n",
    "            score -= 15\n",
    "\n",
    "        if profit[2]>profit[1]:\n",
    "            score += 20\n",
    "        else:\n",
    "            score -= 20\n",
    "\n",
    "        if profit[3]>profit[2]:\n",
    "            score += 25\n",
    "        else:\n",
    "            score -= 25\n",
    "        \n",
    "        if len(profit) > 4 :\n",
    "            if profit[4]>profit[3]:\n",
    "                score += 30\n",
    "            else:\n",
    "                score -= 30\n",
    "\n",
    "        return score\n",
    "\n",
    "    # 经营活动现金流量\n",
    "    score = range_decay(rets[\"net_operate_cash_flow\"], score)\n",
    "\n",
    "    # 税后净利\n",
    "    score = range_decay(rets[\"adjusted_profit\"], score)\n",
    "\n",
    "    # 现金流量比率\n",
    "    total_current_liability = rets[\"total_current_liability\"].mean()\n",
    "    net_operate_cash_flow = rets[\"net_operate_cash_flow\"].mean()\n",
    "    cash_flow_liability = net_operate_cash_flow / total_current_liability\n",
    "    if cash_flow_liability >= 1.0:\n",
    "        score +=50\n",
    "    elif cash_flow_liability >= 0.8:\n",
    "        score +=30\n",
    "    \n",
    "    return score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "columns = [\"stock_code\", \"name\", \"score\"]\n",
    "score_list = pd.DataFrame(columns = columns)\n",
    "\n",
    "for index in range(len(stock_list)):\n",
    "    \n",
    "    ts_code = ts_code_trans(stock_list[\"ts_code\"][index])\n",
    "    q = query_stock(ts_code)\n",
    "    \n",
    "    rets = None\n",
    "#     for i in range(9):\n",
    "#         ret = get_fundamentals(q, statDate='201' + str(i))\n",
    "#         rets = pd.concat([rets, ret], ignore_index=True) if i != 1 else ret\n",
    "\n",
    "#     tmp_rets = rets[-5:].reset_index(drop=True) if len(rets) >= 5 else None\n",
    "#     score = calculate_score(tmp_rets) if tmp_rets is not None else None\n",
    "#     rets.to_csv(\"../data_pulled/pyramid/{}.csv\".format(stock_list[\"ts_code\"][index]), index=False)\n",
    "    \n",
    "    for i in range(9):\n",
    "        ret = get_fundamentals(q, statDate='201' + str(i)) \n",
    "        rets = pd.concat([rets, ret], ignore_index=True) if i != 1 else ret\n",
    "    \n",
    "    tmp_rets = rets[-5:].reset_index(drop=True) if len(rets) == 4 else None\n",
    "    score = calculate_score(tmp_rets) if tmp_rets is not None else None\n",
    "    \n",
    "    list_tmp = pd.DataFrame([[stock_list[\"ts_code\"][index], stock_list[\"name\"][index], score]], columns=columns)\n",
    "    score_list = score_list.append(list_tmp)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "score_list = score_list.sort_values(['score'],ascending=False).reset_index(drop=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "score_list.to_csv(\"../data_pulled/stock_score_2018.csv\", index=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>stock_code</th>\n",
       "      <th>name</th>\n",
       "      <th>score</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>601155.SH</td>\n",
       "      <td>新城控股</td>\n",
       "      <td>760</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>603866.SH</td>\n",
       "      <td>桃李面包</td>\n",
       "      <td>720</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>603899.SH</td>\n",
       "      <td>晨光文具</td>\n",
       "      <td>670</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>002749.SZ</td>\n",
       "      <td>国光股份</td>\n",
       "      <td>670</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>603568.SH</td>\n",
       "      <td>伟明环保</td>\n",
       "      <td>670</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>001979.SZ</td>\n",
       "      <td>招商蛇口</td>\n",
       "      <td>670</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>603898.SH</td>\n",
       "      <td>好莱客</td>\n",
       "      <td>650</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>603589.SH</td>\n",
       "      <td>口子窖</td>\n",
       "      <td>620</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>601985.SH</td>\n",
       "      <td>中国核电</td>\n",
       "      <td>600</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>002777.SZ</td>\n",
       "      <td>久远银海</td>\n",
       "      <td>570</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>603885.SH</td>\n",
       "      <td>吉祥航空</td>\n",
       "      <td>550</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>603788.SH</td>\n",
       "      <td>宁波高发</td>\n",
       "      <td>550</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>603338.SH</td>\n",
       "      <td>浙江鼎力</td>\n",
       "      <td>550</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>603025.SH</td>\n",
       "      <td>大豪科技</td>\n",
       "      <td>530</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>002773.SZ</td>\n",
       "      <td>康弘药业</td>\n",
       "      <td>530</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>603997.SH</td>\n",
       "      <td>继峰股份</td>\n",
       "      <td>520</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>603023.SH</td>\n",
       "      <td>威帝股份</td>\n",
       "      <td>520</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>603883.SH</td>\n",
       "      <td>老百姓</td>\n",
       "      <td>500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>002768.SZ</td>\n",
       "      <td>国恩股份</td>\n",
       "      <td>500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>601689.SH</td>\n",
       "      <td>拓普集团</td>\n",
       "      <td>500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>603030.SH</td>\n",
       "      <td>全筑股份</td>\n",
       "      <td>490</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>603939.SH</td>\n",
       "      <td>益丰药房</td>\n",
       "      <td>470</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>601021.SH</td>\n",
       "      <td>春秋航空</td>\n",
       "      <td>470</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>603108.SH</td>\n",
       "      <td>润达医疗</td>\n",
       "      <td>470</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>603198.SH</td>\n",
       "      <td>迎驾贡酒</td>\n",
       "      <td>470</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>603519.SH</td>\n",
       "      <td>立霸股份</td>\n",
       "      <td>470</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>002739.SZ</td>\n",
       "      <td>万达电影</td>\n",
       "      <td>470</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>002775.SZ</td>\n",
       "      <td>文科园林</td>\n",
       "      <td>460</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>603678.SH</td>\n",
       "      <td>火炬电子</td>\n",
       "      <td>460</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>603686.SH</td>\n",
       "      <td>龙马环卫</td>\n",
       "      <td>460</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>603601.SH</td>\n",
       "      <td>再升科技</td>\n",
       "      <td>460</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>002757.SZ</td>\n",
       "      <td>南兴股份</td>\n",
       "      <td>460</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>603968.SH</td>\n",
       "      <td>醋化股份</td>\n",
       "      <td>460</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>33</th>\n",
       "      <td>603989.SH</td>\n",
       "      <td>艾华集团</td>\n",
       "      <td>460</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>34</th>\n",
       "      <td>601211.SH</td>\n",
       "      <td>国泰君安</td>\n",
       "      <td>450</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>35</th>\n",
       "      <td>603066.SH</td>\n",
       "      <td>音飞储存</td>\n",
       "      <td>450</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>36</th>\n",
       "      <td>000166.SZ</td>\n",
       "      <td>申万宏源</td>\n",
       "      <td>450</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37</th>\n",
       "      <td>603355.SH</td>\n",
       "      <td>莱克电气</td>\n",
       "      <td>440</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38</th>\n",
       "      <td>002769.SZ</td>\n",
       "      <td>普路通</td>\n",
       "      <td>430</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>39</th>\n",
       "      <td>002755.SZ</td>\n",
       "      <td>奥赛康</td>\n",
       "      <td>430</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>40</th>\n",
       "      <td>002753.SZ</td>\n",
       "      <td>永东股份</td>\n",
       "      <td>430</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>41</th>\n",
       "      <td>603669.SH</td>\n",
       "      <td>灵康药业</td>\n",
       "      <td>420</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>42</th>\n",
       "      <td>603808.SH</td>\n",
       "      <td>歌力思</td>\n",
       "      <td>420</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>43</th>\n",
       "      <td>002756.SZ</td>\n",
       "      <td>永兴材料</td>\n",
       "      <td>420</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>44</th>\n",
       "      <td>002771.SZ</td>\n",
       "      <td>真视通</td>\n",
       "      <td>420</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>45</th>\n",
       "      <td>603026.SH</td>\n",
       "      <td>石大胜华</td>\n",
       "      <td>400</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>46</th>\n",
       "      <td>002745.SZ</td>\n",
       "      <td>木林森</td>\n",
       "      <td>400</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>47</th>\n",
       "      <td>002734.SZ</td>\n",
       "      <td>利民股份</td>\n",
       "      <td>390</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>48</th>\n",
       "      <td>603611.SH</td>\n",
       "      <td>诺力股份</td>\n",
       "      <td>390</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49</th>\n",
       "      <td>601368.SH</td>\n",
       "      <td>绿城水务</td>\n",
       "      <td>380</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   stock_code  name score\n",
       "0   601155.SH  新城控股   760\n",
       "1   603866.SH  桃李面包   720\n",
       "2   603899.SH  晨光文具   670\n",
       "3   002749.SZ  国光股份   670\n",
       "4   603568.SH  伟明环保   670\n",
       "5   001979.SZ  招商蛇口   670\n",
       "6   603898.SH   好莱客   650\n",
       "7   603589.SH   口子窖   620\n",
       "8   601985.SH  中国核电   600\n",
       "9   002777.SZ  久远银海   570\n",
       "10  603885.SH  吉祥航空   550\n",
       "11  603788.SH  宁波高发   550\n",
       "12  603338.SH  浙江鼎力   550\n",
       "13  603025.SH  大豪科技   530\n",
       "14  002773.SZ  康弘药业   530\n",
       "15  603997.SH  继峰股份   520\n",
       "16  603023.SH  威帝股份   520\n",
       "17  603883.SH   老百姓   500\n",
       "18  002768.SZ  国恩股份   500\n",
       "19  601689.SH  拓普集团   500\n",
       "20  603030.SH  全筑股份   490\n",
       "21  603939.SH  益丰药房   470\n",
       "22  601021.SH  春秋航空   470\n",
       "23  603108.SH  润达医疗   470\n",
       "24  603198.SH  迎驾贡酒   470\n",
       "25  603519.SH  立霸股份   470\n",
       "26  002739.SZ  万达电影   470\n",
       "27  002775.SZ  文科园林   460\n",
       "28  603678.SH  火炬电子   460\n",
       "29  603686.SH  龙马环卫   460\n",
       "30  603601.SH  再升科技   460\n",
       "31  002757.SZ  南兴股份   460\n",
       "32  603968.SH  醋化股份   460\n",
       "33  603989.SH  艾华集团   460\n",
       "34  601211.SH  国泰君安   450\n",
       "35  603066.SH  音飞储存   450\n",
       "36  000166.SZ  申万宏源   450\n",
       "37  603355.SH  莱克电气   440\n",
       "38  002769.SZ   普路通   430\n",
       "39  002755.SZ   奥赛康   430\n",
       "40  002753.SZ  永东股份   430\n",
       "41  603669.SH  灵康药业   420\n",
       "42  603808.SH   歌力思   420\n",
       "43  002756.SZ  永兴材料   420\n",
       "44  002771.SZ   真视通   420\n",
       "45  603026.SH  石大胜华   400\n",
       "46  002745.SZ   木林森   400\n",
       "47  002734.SZ  利民股份   390\n",
       "48  603611.SH  诺力股份   390\n",
       "49  601368.SH  绿城水务   380"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "score_list[:50]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
